package com.team.student.controller;

import com.team.student.entity.Student;
import com.team.student.service.StudentService;
import com.team.student.service.impl.StudentServiceImpl;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;
@Controller
public class AjaxController {
    @RequestMapping("/getDate")
    @ResponseBody  //底层是基于jackson工具类实现自动转换
    public List<Student> getDate(){
        StudentService ss=new StudentServiceImpl();
        List<Student>li=ss.getStudent();
        return li;
    }
}
